package dp;

public class MatrixChainMultiply {

	public static int matrixChainOrder(int [][] p) {
		int n=p.length-1;
		int [][] m = new int [n][n];
		int [][] s = new int [n][n];
		
		for (int l=2; l<=n; l++) {
			for (int i=0; i<=n-l+1; i++) {
				int j=i+l-1;
				m[i][j] = Integer.MAX_VALUE;
				for (int k=i; k<=j-1; k++) {
					// FIXME
					int q = m[i][k] + m[k+1][j] + p[i][0]*p[i][1]*p[j][1];					
				}
			}
		}
		return 0;
	}
}
